<template>
	<view>
		<uni-table border stripe emptyText="暂无更多数据" :loading="loading">
		    <!-- 表头行 -->
		    <uni-tr>
		        <uni-th align="center" width="50">时间</uni-th>
		        <uni-th align="center" width="50">农产品批发价格200指数</uni-th>
		        <uni-th align="center" width="50">菜篮子产品批发价格200指数</uni-th>
				<uni-th align="center" width="50">粮油产品批发价格200指数</uni-th>
		    </uni-tr>
		    <!-- 表格数据行 -->
		    <uni-tr v-for="item in tableData" :key="item.id">
		        <uni-td align="center">{{ item.time }}</uni-td>
		        <uni-td align="center">{{ item.agricultural }}</uni-td>
		        <uni-td align="center">{{ item.basket }}</uni-td>
			    <uni-td align="center">{{ item.grain }}</uni-td>	
		    </uni-tr>
		</uni-table>
	</view>
</template>

<script>
import * as NoticeApi from '@/api/work/notice'
	export default {
		data() {
			return {
				tableData:[
					{time:"2022-09-02",agricultural:127.19,Basket:132.01,Grain:116.56 },
					{time:"2022-09-01",agricultural:129.19,Basket:131.32,Grain:116.56 },
					{time:"2022-08-31",agricultural:128.4,Basket:130.39,Grain:116.58 },
					{time:"2022-08-30",agricultural:127.64,Basket:129.5,Grain:116.58 },
					{time:"2022-08-29",agricultural:126.86,Basket:128.59,Grain:116.55 },
					{time:"2022-08-28",agricultural:125.53,Basket:127.04,Grain:116.55 },
					{time:"2022-08-27",agricultural:125.24,Basket:126.7,Grain:116.55 },
					{time:"2022-08-26",agricultural:124.83,Basket:126.22,Grain:116.56 },
					{time:"2022-08-25",agricultural:124.46,Basket:125.79,Grain:116.56 },
					{time:"2022-08-24",agricultural:124.32,Basket:125.62,Grain:116.56 }
				]
			}
		},
		methods: {
			getReportList(){
				NoticeApi.getReportList().then(res => {
				  this.tableData = res.reportList;
				})
			}
		},
		created() {
			this.getReportList();
		}
	}
</script>

<style>

</style>
